#ifndef ISubject_H
#define ISubject_H

#include <memory>
#include <vector>

class Observer;
class ObserverVisitor; // 添加前向声明
class ISubject {
public:
    virtual ~ISubject() = default;
    virtual void registerObserver(std::shared_ptr<Observer> observer) = 0;
    virtual void removeObserver(std::shared_ptr<Observer> observer) = 0;


    virtual void notifyObservers(ObserverVisitor& visitor) = 0; // 使用前向声明的ObserverVisitor

    virtual void notifyPlaybackStarted() = 0;
    virtual void notifyPlaybackStopped() = 0;
};

#endif // ISubject_H

